<template>
  <div class="profile">
    <navbar>
      <template #center>我的</template>
    </navbar>
    <user-info></user-info>
    <!--2.没有单独封装: 不同的地方太多, 需要传过多的参数-->
    <section class="account">
      <div class="account-item">
        <div class="number">
          <span class="balance">0.00</span>元
        </div>
        <div class="account-info">我的余额</div>
      </div>
      <div class="account-item">
        <div class="number">
          <span class="balance">0</span>个
        </div>
        <div class="account-info">我的优惠</div>
      </div>
      <div class="account-item">
        <div class="number">
          <span class="balance">0</span>分
        </div>
        <div class="account-info">我的积分</div>
      </div>
    </section>
    <list-view :listData="orderList"></list-view>
     <list-view :listData="serverList"></list-view>
  </div>
</template>

<script>
import navbar from "../../components/common/navbar/navbar.vue";
import ListView from './childComps/ListView.vue';
import UserInfo from './childComps/UserInfo.vue';
export default {
  components: { navbar, UserInfo, ListView },
  name: "profile",
  data() {
    return {
      orderList:[
        {info:"我的消息",icon:""},
        {info:"积分商城",icon:""},
        {info:"会员卡",icon:""},
      ],
      serverList:[
        {info:"我的购物车",icon:""},
        {info:"下载购物APP",icon:""},
      ]
    }
  },
};
</script>

<style scoped>
.account{
  display: flex;
}
.account-item {
  width: 100%;
  background-color: #fff;
  margin-right: 1px;
  text-align: center;
}
.account-item {
  color: #666;
  font-size: 13px;
  padding: 18px;
}
.account-item .balance {
  font-size: 24px;
  font-weight: 700;
  color: #ff5f3e;
}
.account-info {
  margin-top: 6px;
}
.order-list, .service-list {
  margin-top: 12px;
}
</style>